Using the Power Manager
If you are writing an application that is sensitive to the clock speed of the
computer, you can use the Power Manager to disable the idle state when necessary.
Note: Do not disable the idle state except when executing a routine
that must run at full speed. Disabling the idle state shortens the
amount of time the user can operate the Macintosh Portable computer
from a battery.
If you want to ensure that the Macintosh Portable is in the operating state at a
particular time in the future, you can use the SetWUTime function to set the wakeup timer. You can use the wakeup timer in conjunction with the
Time Manager, for example, when you want to use the Macintosh Por table to perform tasks that must be done at a specific time, like printing a large file
in the middle of the night.
If you are writing an application that might be affected by the sleep state of
the computer, you can place in the sleep queue a routine that handles whatever
preparations are necessary to protect your program when the Macintosh
Portable enters the sleep state. See the description of
If you are writing a device driver for the Macintosh Portable computer, you
might need to use the Power Manager to control power to the subsystem that power control for the serial communications sub system. For power control for
other devices, consult Apple Developer Technical Support. The
Power Manager cannot control power to external peripheral devices such as hard disks and CD-ROM drives because such devices have their own power
supplies.
You can also use Power Manager functions to read the status of the internal modem and to read the state of charge of the battery and the status of the battery
charger.